package com.cory.boot.domain;

public class CustomRuntimeException extends RuntimeException {

	private static final long serialVersionUID = -6149564027955065975L;

	protected int code = -1;

	public CustomRuntimeException() {
	}

	public CustomRuntimeException(int code) {
		this.code = code;
	}

	public CustomRuntimeException(int code, String message) {
		this(message);
		this.code = code;
	}

	public CustomRuntimeException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
		super(message, cause, enableSuppression, writableStackTrace);
	}

	public CustomRuntimeException(String message, Throwable cause) {
		super(message, cause);
	}

	public CustomRuntimeException(String message) {
		super(message);
	}

	public CustomRuntimeException(Throwable cause) {
		super(cause);
	}

	public int getCode() {
		return code;
	}

	public CustomRuntimeException setCode(int code) {
		this.code = code;
		return this;
	}

}